package oop.java0324.multidiver;

/**
 * 汽车有座位数、排量等属性。有启动、刹车、等方法
 */
public class Car {
    int seat;//座位数
    int displacement;//排量

    public Car(int seat, int displacement) {
        this.seat = seat;
        this.displacement = displacement;
    }

    public void run() {
        System.out.println("启动");
    }

    public void stop() {
        System.out.println("前方路口，刹车");
    }

    public void showInfo() {
        System.out.println(seat + "座SUV，排量是" + displacement + "cc");
    }
}
